﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sinacor.UI.Bovespa.Ordens.Communication.Bovespa.Custodia.Custodia;
using Sinacor.Infra.UI.Common;
using Sinacor.Infra.Common;

namespace Sinacor.UI.Bovespa.Ordens.Communication.Translator
{
    class TranslatorConsultarPosicaoCustodiaRequest :
          BaseTranslator<Bovespa.Custodia.Custodia.ConsultarPosicaoCustodiaRequest,
          Model.Parameter.ConsultarPosicaoCustodiaRequest ,
          List<Bovespa.Custodia.Custodia.ConsultarPosicaoCustodiaRequest>,
          ModelCollection<Model.Parameter.ConsultarPosicaoCustodiaRequest>>
{
        public override Bovespa.Custodia.Custodia.ConsultarPosicaoCustodiaRequest Translate(Model.Parameter.ConsultarPosicaoCustodiaRequest from)
        {
            Ordens.Communication.Bovespa.Custodia.Custodia.ConsultarPosicaoCustodiaRequest to = new Sinacor.UI.Bovespa.Ordens.Communication.Bovespa.Custodia.Custodia.ConsultarPosicaoCustodiaRequest() ; 
            if (from != null)
            {
                to.Apelido = from.Apelido;
                to.CodigoCliente = from.CodigoCliente;

                to.Ativos = new List<string>(); 

                foreach (string ativo in from.Ativos)
                {
                    to.Ativos.Add(ativo);
                }
                
            }
            return to;
         }
}
}
    